Review of Delphi
by
Shawn M. Gordon
President
S.M.Gordon & Associates

Introduction

Are you starting to realize that if you want to continue to command the big bucks and be sellable as a computer programmer that you are going to have to start doing Windows programming? Have you tried learning C or C++ (one of the biggest kludge languages I have ever seen), and felt it was just all to overwelming? You probably have heard of, or even tried Visual Basic, but you probably found, like I did, that you tend to run into a wall just after you have gotten too far into a project to easily change environments. If any of these scenarios sound familiar, then maybe Delphi is for you, and that will be the subject of this review.

Delphi comes from Borland, the same company that brought you Paradox, and own dBase. Delphi is similar to Visual Basic in it’s conceptualization, but the similarities really end there. Delphi is based on Borlands own Turbo Pascal, which is an Object Oriented version of Pascal. I ran the software on my 25Mhz 486 with 12Meg of RAM and 1Gig of disk spaces.

Features

Comparisons between Delphi and Visual Basic are inevitable, so I will go ahead and make them where appropriate. Delphi has a visual design environment that is similar, but superior to VB in my opinion. Look at figure 1 to see an overview of the Delphi design area. The icons along the top are logically grouped visual controls. By selecting a tab, you are able to access that sub-group of controls (or Components as they’re referred to in Delphi) for designing your form. Delphi is very friendly in the respect that each icon will give you a little pop-up description of what it is when you let the mouse rest on it for a second, unlike VB. It has better built in controls than VB, it will also make use of VBX custom controls for VB, and you get a more logically laid out environment.

So how do you create a program in Delphi? Well the hard part is designing the user interface, you can easily spend days, if not weeks, fine tuning and tweaking the user interface. Once you have it looking the way you want, then the fun part (or hard part) starts, that is writing the actual code behind the objects that do what you want them to do. What is interesting to me, is that is always how I use to write programs, so this is a fairly natural extension for me, it’s just significantly easier to develop the user interface now.

The user interface design consists of dragging objects off the of the component pallet and placing them on the form where you want. You can the adjust things like size, color, font, and position, until you get the form looking just how you want. You can even run the application at this point to make sure that your tab sequencing is correct, and that your application is going to look the same between running, and designing it. One frustration I have always had with VB is when I move the source code from on e computer to another, the application starts to behave differently, I didn’t have this problem with Delphi.

One of the neat things in Delphi is that it has form ‘templates’ that you can use when first starting a form. This get’s you started in the right direction when creating certain types of forms, like ‘About’ or an ‘MDI (Multiple Document Interface)’, or others. You can even build your own templates. This is like an organized version of taking an old piece of code that is similar to something you are doing now, and using that as the starting point.

There is an aspect of Delphi that I found absolutely fascinating, and that was it’s ability to build your GUI code from the ObjectPascal. That means you can actually just type in the object descriptors. I know you can get a print out of this information in Visual Basic, but I never noticed if you could actually type it in this way. It makes for a quick example when describing to someone how to build a form in a particular fashion. As you build your application you will see the Pascal code generated at the same time. From what I can see in Delphi, it has the code more centralized than VB, and this can be good and bad, but not being an expert in either, it’s hard to comment.

The hardest part about maintaining a project in VB, and to a certain degree in Delphi, is finding the piece of code you care about. Typically you have to either do a global search if you have an idea of what you are looking for, or select each object on the form and check each event to see if it is doing what you are looking for. Delphi makes this a much easier process by use of it’s Object Browser (I understand VB 4 will have an Object Browser as well).

Figure 2 shows you an example of the Object Browser, this can be used to brose through the items used by your application in a graphical fashion. Actually it goes beyond just being an Object Broser, you can get information on just about anything in a Delphi application. You can browse global routines, units, objects, methods, etc. The Object Browser is sort of hard to explain in detail, but it is a very handy tool to have once you get used to it. There are basically three parts to the Object Browser, on the left is the Inspector pane, on the right is the Details pane, and on the top is the Filter Options SpeedBar.

One of the things that is sort of tedious in VB is building a menu bar, in Delphi it is more of an interactive environment, where you are building the menu bar right on the application instead of in a seperate program area.

I know it’s not that big a deal to be in the little menu program, but it is just another example of how integrated Delphi is.

An odd limitation in VB is that a command MUST be on one line, this can sometimes turn into a horizontal scroll nightmare. Delphi, like most languages, allows you to split your commands up however you want. I did find that the tabbing inside the code edit or was pretty strange. First the tab stops were set to some really strange value that I had to change, then if you are just using the space bar to indent, and then use the backspace key, the cursor will jump back to where it started originally. I never did find if this was a configurable feature or a bug.

As I said, comparisons between VB and Delphi are inevitable, and those of you who already have a sizable investment in VB will probably be hesitant to make the switch. Well guess what, there is a handy little $79 product called Conversion Assistant from a company called EarthTrek Inc., at 617-273-0308, that will convert VB to Delphi. In general it seems to work as well, however there are limitations, and it won’t usually get 100% of the way converted. For example, VB does not support a Boolean type variable, so many people use an Integer variable to simulate a Boolean. This will convert to Delphi as an Integer type, but should probably be changed to Boolean. Also, MDI forms will not directly convert (this is the biggest problem in my opinion). You have to convert the form to a regular form, convert it, then go into Delphi and change the project back to MDI forms. Basically you can expect to get between 80% and 100% conversion, depending obviously, on how the project is coded.

The Conversion Assistant will create a log file for you as it converts, that keeps track of problems, or unconverted commands. This makes it relatively simple to go back and fix the pieces that still need to be fixed. The Conversion Assistant isn’t a perfect tool, but for $79 and a some time on your part, you can have your application running about 10 times faster for your end-users, and that seemed pretty darn reasonable to me.

As I mentioned earlier in the review, Delphi can import and put an object wrapper around VBX controls, so they can be used in Delphi. A VBX is one of the best things about VB, it allows people to write extensions to VB, and let you add it to your toolbox. The only problem with VBX’s is that they must be written in C/C++. There is a huge market of VBX’s out there, so it was a very smart move for Borland to include support for them in Delphi. Delphi has an equivalent to the VBX called the VCL (Visual Component Library). The main difference is that components for Delphi can be written IN Delphi. This means one language, one environment for pretty much everything you could want to do. I haven’t written my own components yet, but you can bet I will be. I need
ed an OLE Automation component (because Borland did a rather weak job implementing OLE inside of Delphi), and I found a guy in New Zeland that had one for about $40. The interesting thing here is that OLE was added to Delphi IN Delphi. I can’t emphasize e
nough how powerful that extensibility is. One last note on Delphi only conforms to the VBX 1.0 spec, so make sure that if you are going to want to rely on a VBX, that it will work with Delphi.

It’s not easy to review a product of this size and scope is never easy. I don’t want to get into the particulars of ObjectPascal (which is not that intuitive, but not as bad as C++) because it just goes way beyond the boundaries of a review. I do hope I m
anaged to cover the innovative features of Delphi enough.

Usability (also installation)

If you have used Visual Basic at all, you will be fairly comfortable in Delphi and probably be able to build a form without even looking at the documentation, I did. The installation process is very simple if you use the CD-ROM, just pop it in, answer a few questions, and walk away for a bit. The product takes from 40 to 60 Meg of disk spaces depending on what options you install. So make sure you have some room left on your system.

Reliability

There are a few odd bugs in Delphi, and I downloaded a patch from CompuServe during the course of this review. The software seemed to work reliably overall, and performs rather quickly. If you have been using Visual Basic, you will think it is slow, but that is because it is actually compiling the program, and doing it very

fast. Visual Basic only does a syntax check and runs it interpreted. So keep that in mind.

Performance

The Delphi environment itself seems to scoot right along, it is quick to add controls to a form, and to make changes to the properties. When you run a project you will think that it is slower than Visual Basic, and it is, but keep in mind it is actually doing a compile of your project, and not run doing a syntax check of your code. Once you have run a project the first time, then only the changed sections have to be compiled and linked together, so subsequent runs are typically faster. The performance of the executable code is much much faster than Visual Basic, since it is actually compiled (as much as a Windows program can be) as opposed to Visual Basic which is still interpreted. I think you will be very pleased with the performance of your projects in Delphi.

Supportability (including Doc)

All the manuals are available online in Acrobat format, which is much more robust than the standard windows Help file format. It is pretty easy to find what you want this way. You can also check the hard copy documentation, which is pretty well laid out.

There are five manuals included that cover each aspect of Delphi. You have the ‘User’s Guide’ which goes over basic skills, programming with Delphi, and sample applications. A ‘Database Application Developer’s Guide” that covers database components and tools, and building Client/Server applications. A “Local InterBase Server User’s Guide” (InterBase is Borlands portable relational database). “ReportSmith for Windows” manual (ReportSmith is Borlands commercial report writer) that covers creating and format ting reports, the macro language, runtime viewer, and the data dictionary. And finally the “Component Writer’s Guide”, if you can get good at writing components you could make a fortune. The problem you will probably have is knowing what question it is you want to ask.

Trying to call a company like Borland or Microsoft for help can be a real exercise in patience, and as you have probably found in the past with PC programs, it’s easier to find out yourself somehow. Borland does offer a few options for support, there is “Up and Running” which is a short freebie that only makes sure you get installed and running with no problems. There is the “Pay-as-you-go Support” option which has three sub-options, the Advisor Line is $2 per minute, the first minute is free. The “Client/Server connectivity Incident Line” which is $200 per incident and guarantees quick response, and then the Borland KnowledgBase CD which is a $249 subscription and you get quarterly. Then you have an Annual Contract which can vary from $149 a year to $3000 depending on what options you get. It’s nice that Borland is offering options, and for us MiniComputer types, we are used to paying annual support anyway.

The CompuServe Information System is a great place to get support on many products, and Borland has a forum just for Delphi, GO DELPHI. I found that this is the best way to get help. There is also a gentleman in this forum that is doing a volunteer bi-weekly newsletter for Delphi that is in Windows help file format. I have gotten five of these so far, and they are very helpful. Also, the amount of answers you can get for a question on CompuServe can almost be overwhelming, but it is always pretty quick. I strongly suggest CompuServe as a support service for pretty much everything, I have been using it for about 10 years now.

Summary

I really like Delphi compared to the other Windows environments I’ve worked with. What I find odd is that the first thing the Phillipe Khan (the founder of Borland) wrote was a Pascal compiler, and even though Borland has a very robust C environment, they still insist on making all of their macro languages, and Delphi, in a proprietary version of Pascal. Microsoft, which was founded by Bill Gates, first had a BASIC interpreter, and they also have a very robust C environment, but here again they are making all of their macro languages (as well as Visual Basic of course), and such as a bizarre derivative of BASIC.

I talked to some people from Borland about the fact that Delphi is based on Object Pascal, and they had a good justification for it. Basically they invented Object Pascal (actually I think Apple did), and they can do whatever they want with it in terms of extensions and features. Unlike other languages such as C where there is a standard you need to conform to. This doesn’t change the fact to me, that you don’t have to be a C compiler, you can just use a C like syntax, or better yet, a COBOL like syntax. I heard a rumor that their might be a C version of Delphi, but it was just a rumor. The announcement for Delphi32 (The 32 bit version for NT and Windows95) will support Borlands C/C++ OBJ file format for Delphi.

Delphi is a very robust environment, the ability to create a VCL for the environment, IN the environment is tremendous. You can create DLL’s that can be called from other languages, and you get a compilied program that executes up to 10 times faster than something written in Visual Basic. All this allows you to be more flexible within a single language instead of having to use two or three languages. The group development ability in the Client/Server version is also a welcome addition. Of course you can also maintain your investments in VBX’s if you wish, but I found that it was almost as easy to just use Delphi for everything. I just didn’t like having to learn Pascal, but I think that this is really a top notch, and reasonably priced product for building commercial quality Windows applications.

My only real concern is the stability, and potential longevity of Borland itself. There is talk of Novell buying out the rest of Borland, and IBM has a Visual Basic wanna be called BART coming out around the end of ’95, not to mention PowerObjects from Oracle to compete with. Visual Basic 4 will becoming soon, with some of these features built in as well, Borland could have a hard time convincing people to switch to Pascal, of course there are all those kids that were taught Pascal in school 5 to 10 years ago that should be thrilled. As for me, I really loved Delphi, this is going to turn into the Client/Server delopment choice for me, at least in my own business, and anyone else I can talk into it. I may even try to write some shareware applications now.

At-a-Glance box

Delphi version 1.0
Borland International
800-336-6464 ext 50151 (or go to any computer store)
List price is $499, but can be had on the street for as cheap as $189 right now. Support options are described the Supportability section of this review.